﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Masters/WithoutPermBasic.Master" AutoEventWireup="true" CodeBehind="PC_UnComparePriceWait.aspx.cs" Inherits="PMS.WaitDealUI.PC_UnComparePriceWait" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script type="text/javascript">
        $(function () {
            var DealId = com.get.DealId;
            $("#tbList").datagrid({
                url: '/Logic/CommonAjax/WaitDealAjax.aspx?method=CommonWaitDealList',
                loadMsg: '数据加载中请稍后……',
                fitColumns: true,
                rownumbers: true,
                idField: "ID",
                singleSelect: false,
                queryParams: { DealId: DealId },
                striped: true,
                frozenColumns: [[{ field: 'ck', checkbox: true, width: 30 },
                 { field: 'PlanBatchId', title: '（技术）计划批号 ', align: "center" },
                 { field: 'PlanTrackId', title: '计划跟踪号 ', align: "center" },
                 { field: 'Tuhao', title: '图号/标识号 ', align: "center" },
                 { field: 'MaterialCode', title: '物料编码 ', align: "center" },
                 { field: 'MaterialName', title: '物料名称 ', align: "center" }, ]],
                columns: [[
                 { field: 'MaterialGuige', title: '规格 ', align: "center" },
                 { field: 'MaterialCaizhi', title: '材质 ', align: "center" },
                 { field: 'MaterialGB', title: '国标 ', align: "center" },
                 //{ field: 'SupplierName', title: '供货商名称 ', align: "center" },
                 //{ field: 'Price', title: '价格 ', align: "center" },
                 { field: 'PcPlanNum', title: '采购计划数量 ', align: "center" },
                 { field: 'PurcUnit', title: '采购单位 ', align: "center" },
                 { field: 'DividerName', title: '分工人Name ', align: "center" },
                 { field: 'DivideDate', title: '分工日期', align: "center" },
                 { field: 'PurchaseName', title: '采购员Name ', align: "center" },
                 { field: 'ApplyName', title: '申请人Name ', align: "center" },
                 { field: 'PcPlanAidNum', title: '采购计划辅助数量 ', align: "center" },
                 { field: 'ExecutorNum', title: '执行数量', align: "center" },
                 { field: 'MaterialType', title: '类型 ', align: "center" },
                { field: 'ExecutorName', title: '执行人', align: "center" },
               { field: 'ExecutorDate', title: '执行日期', align: "center" },
                {
                    field: 'State', title: '状态 ', align: "center", formatter: function (value, row, Index) {
                        return com.getArrayText(StaticCombo.PcDemandPlanState, value);
                    }
                },
               { field: 'Note', title: '备注 ', align: "center" }]],
            });
        });
        //下推询比价
        function funcCompare() {
            //console.log("aa");
            var rows = $("#tbList").datagrid("getSelections");
            var n = 0;
            if (rows.length != 0) {
                var oId = { planinfo: JSON.stringify(rows) };
                //console.log(oId);
                com.ajax({
                    url: "/Logic/PC/PC_ComparePriceAjax.aspx?method=insertCompare",
                    data: oId,
                    success: function (data) {
                        if (data.state == "success") {
                            //console.log(data.ComId);
                            top.wrapper.addTab("询比价", "/UI/PC/PC_ComparePrice.aspx?CompPriceId=" + data.ComId);
                        }
                    }
                });
            }
            else {
                com.message("information", "请至少选中一行");
            }
        }
    </script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceToorbar" runat="server">
    <a href="javascript:void(0)" id="compare" class="easyui-linkbutton" onclick="funcDivide()"
        data-options="iconCls:'icon-settings32',plain:true">下推比价</a> &nbsp;&nbsp;
    
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
    <table id="tbList" title="非招--比价" style="width: 100%">
        </table>
</asp:Content>
